package com.danbay.cloud.account.dto;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @author SJG
 *         2018/1/23.
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class FindPwdDto {
    /**
     * 手机号
     */
    @Pattern(regexp = "1[0-9]{10}", message = "手机号格式不正确")
    @NotNull(message = "手机号不能为空")
    private String mobile;
    /**
     * 新密码
     */
    @NotNull(message = "新密码不能为空")
    @Length(min = 6, max = 30, message = "密码长度为6-30")
    private String newPwd;
}
